<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bir</title>
</head>

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script>

<body>
    input right here!
    <form action="process.php" method="post">

        <div id="content">
            <div>
                name:<input type="text" name="names[]" value="xxx">
                bir:<input type="text" name="birth[]" value="0227">
            </div>
            <div>
                name:<input type="text" name="names[]" value="">
                bir:<input type="text" name="birth[]" value="">
            </div>
        </div>


        <button type="submit" value="提交">submit</button>
    </form>

    <button id="addinput">click to append</button>
</body>

<script type="text/javascript">
    (function () {
        $('#addinput').click(function () {
            console.log("666");
            $('#content').append('<div> name:<input type="text" name="names[]" value=""> bir:<input type="text" name="birth[]" value=""></div>')
        });
    })();
</script>

</html>

<?php 
    session_start();
    if (!isset($_SESSION["inad"]) || $_SESSION["inad"]!==true){
        header("refresh:0;url=login.php");
    }
?>